﻿Option Explicit On
Option Strict On
Imports System.Data.OleDb

Public Class FormModificarJugador
    Dim MiDB As BaseDatos
    Dim Jugadores As Jugador
    Dim NombreJugador As String

    Private Sub FormModificarJugadores_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        Me.MdiParent = FormConsultas
        Me.Top = 484
        Me.Left = 0
        NombreJugador = tb_Nombre.Text
    End Sub

    Private Sub btn_Aceptar_Click(sender As Object, e As EventArgs) Handles btn_Aceptar.Click

        MiDB.Modificar("UPDATE Jugador SET Nombre = '" & tb_Nombre.Text & "', " & _
                       "Apellido = '" & tb_Apellido.Text & "', Direccion = '" & tb_Direccion.Text & "', " & _
                       "Telefono = '" & mtb_Telefono.Text & "', Email = '" & tb_Email.Text & "', " & _
                       "WhatsApp = '" & cb_Whatsapp.Checked & "', FaceBook = '" & tb_Facebook.Text & "', " & _
                       "Twitter = '" & tb_Twitter.Text & "', Observaciones = '" & tb_Observaciones.Text & "' " & _
                       "WHERE (Jugador.Nombre = '" & NombreJugador & "')")
    End Sub
End Class